﻿using MaiPlanServer.Model;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace MaiPlanServer.IServices.IQualityServices
{
    public interface IDefectServices
    {
        /// <summary>
        /// 分页获取数据
        /// </summary>
        /// <param name="PageIndex"></param>
        /// <param name="PageSize"></param>
        /// <param name="Describe">缺陷描述</param>
        /// <param name="Type">检测项类型</param>
        /// <param name="Level">缺陷等级</param>
        /// <returns></returns>
        public Task<IEnumerable<qc_defect>> GetJsonAsync(int PageIndex,int PageSize,string Describe,string Type,string Level);

        /// <summary>
        /// 获取数据总条数
        /// </summary>
        /// <param name="Describe">缺陷描述</param>
        /// <param name="Type">检测项类型</param>
        /// <param name="Level">缺陷等级</param>
        /// <returns></returns>
        public Task<int> GetCountAsync(string Describe,string Type,string Level);

        /// <summary>
        /// 添加
        /// </summary>
        /// <returns></returns>
        public Task<bool>AddAsync(qc_defect model);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="Describe"></param>
        /// <param name="Type"></param>
        /// <param name="Level"></param>
        /// <returns></returns>
        public Task<bool>DelAsync(string Id);

        /// <summary>
        /// 删除多条
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public Task<bool> DelAsync(string[] Id);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public Task<bool> UpdateAsync(qc_defect model);
    }
}
